home *** CD-ROM | disk | FTP | other *** search
/ Video Toaster 4.0 / Video Toaster v4.0.iso / programs / documentation / lightwavearexx.doc < prev    next >
Text File  |  1993-12-13  |  6KB  |  183 lines

  1. LightWave 3D ARexx Command Set
  2.  
  3. When LightWave 3D is first started, it opens a message port called
  4. 'LightWaveARexx.port' that can receive ARexx commands, thus allowing the program
  5. to be externally controlled. Currently, not all LightWave functions are accessible in this 
  6. way, but the 16 supported commands are enough to accomplish remote scene loading and
  7. rendering as well as some scene modification. Note that the shared library 
  8. 'rexxapp.library' must be in the LIBS: directory for the ARexx port to work.
  9.  
  10. This document lists the currently supported commands and includes a sample ARexx 
  11. program for remote control of LightWave.
  12.  
  13. Supported Commands
  14.  
  15. CurrentObject <Object Number>
  16. Selects the given object.
  17.  
  18. SetPoint <point number> <x> <y>
  19. Moves a point in the current object to a new position.  The point number is
  20. an integer starting at 0 and the coordinates can be floating point values.
  21. The object will remain changed as long as it is loaded, and the changes
  22. will be saved if the object is saved.  Moving points in this way does not
  23. allow motion blur nor will it be visible in the preview.
  24.  
  25. AsyncMode <on/off>
  26. If this option is on the render command will return control to the ARexx
  27. program which called it immediately, otherwise LightWave will finish
  28. rendering before returning.  The LoadScene command also becomes
  29. asynchronous when this mode is on.  This allows laarge scenes to be loaded
  30. without tying up the ARexx caller.  This mode is particularly useful for
  31. controlling multiple, networked machines.  The following two commands are
  32. specifically for use in asynchronous mode:
  33.  
  34. Abort
  35. Abort rendering (just like the escape key in LightWave)
  36.  
  37. WriteStatus
  38. This command causes LightWave to write a status file, which a controlling
  39. program can read to determine what LightWave is working on.  The status
  40. file contains 3 numbers: the current frame being rendered, the current
  41. segment (starting from one at the top), and the current antialiasing pass.
  42. This command will only work if a valid status file name has been given in
  43. the LW-config file or via the StatusFilename command.
  44.  
  45. StatusFilename <name>
  46. This changes the directory and file name where LightWave writes status
  47. files. A name of "(none)" disables status writing.
  48.  
  49. Antialiasing <mode>
  50. The modes are 0=off, 1=low, 2=med, 3=high.
  51.  
  52. FilterType <type>
  53. Currently the types are 0=default, 1=soft filter on.
  54.  
  55. FieldRendering <on/off>
  56. Toggles field rendering.
  57.  
  58. SaveAlphaImages <image file prefix>
  59. This command tells LightWave where to save 8-bit alpha images.
  60.  
  61. EnterModeler
  62. This command loads (if necessary) and enters Modeler.
  63.  
  64. LoadScene <scene filename>
  65. This command causes LightWave to clear whatever scene is in memory and load the 
  66. specified scene file. Loading and rendering of a whole series of scenes can now be 
  67. accomplished with a simple ARexx program. A more sophisticated program could 
  68. actually write new LightWave scene files and cause them to be loaded, allowing control 
  69. over functions not currently supported by their own ARexx commands.
  70.  
  71. FirstFrame <frame number>
  72. LastFrame <frame number>
  73. FrameStep <number of frames>
  74. These commands can be used after a scene has been loaded to change the range of frames 
  75. to be rendered.
  76.  
  77. RayTraceEffects <ray tracing mode>
  78. The ray tracing mode is the sum of several numbers. Starting with zero, add one if ray 
  79. traced shadows are desired, two for ray traced reflections, and four to calculate refraction. 
  80. For example, seven would turn on all effects, and five would indicate everything but 
  81. reflection. (0 = no ray tracing, 1 = Shadows, 2 =  Reflections, 3 = Shadows and 
  82. Reflections, 4 = Refraction, 5 = Shadows and Refraction, 6 = Reflections and Refraction, 
  83. and 7= Shadows, Reflections, and Refraction.)
  84.  
  85. Resolution <resolution mode>
  86. The resolution mode numbers correspond to the resolution choices on LightWave's
  87. Camera panel, starting with zero for Super Low Res and going up to four for Print
  88. Resolution. 
  89.  
  90. Overscan <on/off>
  91. Letterbox <on/off>
  92. Passing a zero with either of these commands will switch off the corresponding option, 
  93. while a one switches them on.
  94.  
  95. ZenithColor <red> <green> <blue>
  96. SkyColor <red> <green> <blue>
  97. GroundColor <red> <green> <blue>
  98. NadirColor <red> <green> <blue>
  99. FogColor <red> <green> <blue>
  100. These commands accept three numbers (in the 0 to 255 range) to indicate the red, green, 
  101. and blue color components. An ARexx program could use these commands together with 
  102. the FirstFrame, LastFrame, and Render commands to animate backdrop colors during a 
  103. scene.
  104.  
  105. SaveImages <image file prefix>
  106. This command is used to activate the saving of IFF24 images and to specify the first part 
  107. of the image filenames. Using '(none)' as the prefix turns off image saving.
  108.  
  109. (continued)
  110. SaveFrames <framestore comment>
  111. This command is used to activate the saving of framestores and to specify the comment 
  112. field of the framestore filenames. Using '(none)' as the comment turns off framestore
  113. saving.
  114.  
  115. Render <frame advance mode>
  116. This command sets the frame advance mode to manual (if the passed value is zero) or 
  117. automatic (if the value is one), and then causes LightWave to begin rendering the scene. 
  118. Control is not returned to the ARexx program until rendering has been finished.
  119.  
  120.  
  121. LightWave 3D 2.0 ARexx Example Program
  122. The following program causes LightWave to load, modify, and render
  123. two scenes:
  124.  
  125. /* LightWave ARexx Example Program */
  126.  
  127. address 'LightWaveARexx.port'
  128.  
  129. 'LoadScene Scenes/SceneFileA'
  130. 'RayTraceEffects 2'/* turns on ray traced reflections only */
  131. 'Resolution 3'/* selects high resolution mode */
  132. 'Letterbox 1'/* turns on letterbox mode */
  133. 'SaveImages SceneA'/* activates IFF24 file saving */
  134. 'Render 1'/* starts rendering with automatic frame advance */
  135.  
  136. /* the program will automatically wait until scene A is done */
  137.  
  138. 'LoadScene Scenes/SceneFileB'
  139. 'SaveFrames SceneB'/* activates framestore saving */
  140. do i = 1 to 30/* the following loop animates the sky color */
  141. 'FirstFrame' i
  142. 'LastFrame' i
  143. 'SkyColor' 120+4*i 180-2*i 240-6*i
  144. 'Render 1'
  145. end i
  146.  
  147. address
  148.  
  149. exit
  150.  
  151. Command List:
  152.  
  153. EnterModeler
  154. Render
  155. LoadScene
  156. FirstFrame
  157. LastFrame
  158. FrameStep
  159. CurrentObject
  160. RayTraceEffects
  161. Resolution
  162. Overscan
  163. Letterbox
  164. Antialiasing
  165. FilterType
  166. FieldRendering
  167. ZenithColor
  168. SkyColor
  169. GroundColor
  170. NadirColor
  171. FogColor
  172. SaveImages
  173. SaveAlphaImages
  174. SaveFrames
  175. AsyncMode
  176. StatusFilename
  177. EnableReqs
  178. SetPoint
  179. RedrawLayout
  180. Abort
  181. WriteStatus
  182.  
  183.